package com.vnp.cooking.bean;

import org.json.JSONException;
import org.json.JSONObject;

public class ObjNguyenlieu {
	String nguyenLieu;
	String soLuong;
	public String getNguyenLieu() {
		return nguyenLieu;
	}
	public void setNguyenLieu(String nguyenLieu) {
		this.nguyenLieu = nguyenLieu;
	}
	public String getSoLuong() {
		return soLuong;
	}
	public void setSoLuong(String soLuong) {
		this.soLuong = soLuong;
	}
	
	// contructor
	public ObjNguyenlieu(String nguyenLieu, String soLuong){
		super();
		this.nguyenLieu = nguyenLieu;
		this.soLuong = soLuong;
	}
	
	public ObjNguyenlieu() {
		super();
	}
	
	public JSONObject getJSONObject() {
	        JSONObject obj = new JSONObject();
	        try {
	            obj.put("name", nguyenLieu);
	            obj.put("amount", soLuong);	
	        } catch (JSONException e) {
	        	e.printStackTrace();
	        }
	        return obj;
	 }
} 
